import { Sequelize } from "sequelize";
import sqlite3 from "sqlite3";
// import { app } from "electron";
import path from "path";

const app_path = "C:\\Users\\Administrator\\AppData\\Roaming\\my_Tools";
const db_folder = path.join(app_path, "data_base");
const db = path.join(db_folder, "db.sqlite");

// 定义数据库文件路径
let sequelize = new Sequelize({
  dialect: "sqlite",
  dialectModule: sqlite3,
  storage: db,
  logging: false // 禁用数据库操作日志
});

export { sequelize };
